package com.rd.student.jike.class5.wujunhao.day0711;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;

public class HashMapTest {
    public static void main(String[] args) {
        HashMap hashMap = new HashMap();
        hashMap.put("01",5);
        hashMap.put("02",7);
        hashMap.put("03",6);
        hashMap.put("04",6);
        hashMap.put("05",7);
        hashMap.put("06",6);
//        int num = (int)hashMap.get("02");
        info(hashMap);
        System.out.println("+++++++++++++++++");

        HashMap hashMap1 = new HashMap();
        hashMap1.put("计科",5);
        hashMap1.put("软件",7);
        hashMap1.put("物联",6);
        hashMap1.put("大数据",6);
        info(hashMap1);
        System.out.println("++++++++++++++++++++++");

        HashMap hashMap2 = new HashMap();
        hashMap2.put(20,5);
        hashMap2.put(18,7);
        hashMap2.put(21,6);
        hashMap2.put(24,6);
        hashMap2.put(23,7);
        hashMap2.put(19,6);
        info(hashMap2);
    }
    public static void info(HashMap hashMap){
        Set set = hashMap.keySet();
        Iterator iterator = set.iterator();
        while (iterator.hasNext()){
            Object key = iterator.next();
            Object value = hashMap.get(key);
            System.out.println("<" + key + "," + value + ">");
        }
    }




}
